﻿using System.Collections.Generic;

namespace Inaction.Extendtions
{
    public static class StringExtensions
    {
        public static string[] TrimStringArray(this string[] array)
        {
            List<string> list = new List<string>();
            foreach (var s in array)
            {
                if (!string.IsNullOrEmpty(s.Trim()))
                {
                    list.Add(s.Trim());
                }
            }
            return list.ToArray();
        }
    }
}
